def outer(arg):
    def fun02(func):
        def fun01(x):
            print(x)
            print("装饰器发挥作用")
            return func(x)**2
        return fun01
    return fun02
@outer("这是一个带参数的装饰器")
def func(x):
    print("调用func()函数")
    return x
print(func(2))
print(" ")

def outer(arg):
    def fun02(func):
        def fun01(x):
            print(x)
            print("装饰器发挥作用")
            return func(x)**2
        return fun01
    return fun02
def func(x):
    print("调用func()函数")
    return x 
func02 = outer("这是一个带参数的装饰器")
func = func02(func)
print(func(2))